
Title: Progressive Ideology and Support for Punitive Crime Policy: Evidence from Argentina and Brazil
Author: Isabel G. Laterzo
Journal: Comparative Political Studies
Year: 2023


####################### Technical Information #######################Analysis run on R version 4.3.0 Running under: macOS Ventura 13.0Necessary R packages for analysis (version in parentheses):tidyverse (2.0.0), naniar (1.0.0), cregg (0.4.0), ggplot2 (3.4.2), lavaan (0.6-15), semPlot (1.1.6), stargazer (5.2.3), devtools (2.4.5), cjpowR(1.0.2)*, nnet(7.3-18), scales(1.2.1)

* Install cjpowR with devtools: devtools::install_github("m-freitag/cjpowR")


####################### Included Documents #######################

Save all documents in same working directory and set R working directory using setwd() - access help file for function via ?setwd() in console

Codebook: codebook.pdf

Data:
1) laterzo_cps_2023c.RDS* -- combined data set for conjoint analysis
2) arg_clean.RDS* -- isolated data from Argentina
3) brazil_clean.RDS* -- isolated data from Brazil
4) socioecon_list_IDs.RDS - socioeconomic categories used for App 12

*Please note that for these data frames, each individual corresponds to >1 observations, as each was presented with 5 conjoint experiments. Each has 10 observations (5 observations for chosen candidates, and 5 observations for rejected candidates).



Part 1: Analysis in Main Text 

1) Conjoint using Author's Own Survey

1_main_conjoint_fig2-6.R - conducts main analysis and reproduces Figures 2 through 6 in the main text.
------- Necessary data: laterzo_cps_2023c.RDS

2) Analysis using AmericasBarometer Data

2a_lapop_datacleaning.R - cleans and transforms AmericasBarometer for analysis to be used in the main text and appendices. This also includes some calculation of descriptive statistics
------- Necessary data: requires 2014 rounds of AmericasBarometer data Argentina and Brazil. Data cannot be uploaded per data use requirements. Please find data from LAPOP on their website, here: https://www.vanderbilt.edu/lapop

2b_lapop_analysis.R - conducts main analysis of AmericasBarometers data and reproduces Table 3. 
------- Necessary data: Data frame is not provided due to AmericasBarometer data requirements, but can be created using specified rounds listed above and the 2a_lapop_datacleaning.R



Part 2: Appendix Analysis

1) App5-8_DescriptiveStatistics.R

2) App9_IdeoIndices.R

3) App9_IdeoValidity.R

4) App9_TwoDimen_Models.R

5) App10_SampleSizes.R

6) App10_PowerAnalyses.R

7) App11_AdditionalResults.R

8) App12_SocioEcon_Validity.R

6) App13_OLSconjoint.R

7) App16_victimization.R
